<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
  <link href="https://gmpg.org/xfn/11" rel="profile">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="Hugo 0.79.1" />

  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>网站发布 &middot; yf33</title>
  <meta name="description" content="" />

  
  <link type="text/css" rel="stylesheet" href="https://yf33.gitee.io/blog/css/print.css" media="print">
  <link type="text/css" rel="stylesheet" href="https://yf33.gitee.io/blog/css/poole.css">
  <link type="text/css" rel="stylesheet" href="https://yf33.gitee.io/blog/css/syntax.css">
  <link type="text/css" rel="stylesheet" href="https://yf33.gitee.io/blog/css/hyde.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Abril+Fatface|PT+Sans:400,400i,700">


  
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
  <link rel="shortcut icon" href="/favicon.png">

  
  
</head>

  <body class=" ">
  <aside class="sidebar">
  <div class="container sidebar-sticky">
    <div class="sidebar-about">
      <a href="https://yf33.gitee.io/blog/"><h1>yf33</h1></a>
    </div>
    <nav>
      <ul class="sidebar-nav">
        <li><a href="https://yf33.gitee.io/blog/">Home</a> </li>
        
      </ul>
    </nav>

    <p>&copy; 2021. All rights reserved. </p>
  </div>
</aside>

    <main class="content container">
    <div class="post">
  <h1>网站发布</h1>
  <time datetime=2021-01-30T19:36:08&#43;0800 class="post-date">Sat, Jan 30, 2021</time>
  <h4 id="说明">说明</h4>
<p>如何将编写的文档,免费发布到网上</p>
<p>实现说明：</p>
<ol>
<li>gitee 托管文档</li>
<li>upic 图片自动上传</li>
<li>typora做文档编辑器</li>
<li></li>
</ol>
<h4 id="环境准备">环境准备</h4>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">brew install hugo 
</code></pre></div><h4 id="新建项目">新建项目</h4>
<p>注册并登录 gitee.com</p>
<p><img src="https://gitee.com/yf33/blog/raw/master/uPic/fleM4qT32tpsbOx.png" alt="image-20210130194732363"></p>
<p><img src="https://gitee.com/yf33/blog/raw/master/uPic/DSpa6XvEIqscAG1.png" alt="image-20210130194936835"></p>
<h5 id="下载upic">下载upic</h5>
<p><a href="https://github.com/gee1k/uPic/releases">https://github.com/gee1k/uPic/releases</a></p>
<p><img src="https://gitee.com/yf33/blog/raw/master/uPic/image-20210130202340677.png" alt="image-20210130202340677"></p>
<h5 id="生成gitee秘钥">生成gitee秘钥</h5>
<p><img src="https://gitee.com/yf33/blog/raw/master/uPic/image-20210130202445118.png" alt="image-20210130202445118"></p>
<h4 id="文档编写">文档编写</h4>
<p>安装typora <a href="https://typora.io/">https://typora.io/</a></p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">hugo new site post <span style="color:#75715e">#新建一个网站</span>
cd post/themes <span style="color:#f92672">&amp;&amp;</span> git clone https://github.com/spf13/hyde.git <span style="color:#75715e">#下载网站主题</span>
hugo new post/测试页.md
open content/post/测试页.md 
hugo server --theme<span style="color:#f92672">=</span>hyde --buildDrafts  <span style="color:#75715e">#查看编写效果 http://localhost:1313/blog/</span>
</code></pre></div><h5 id="设置图片上传">设置图片上传</h5>
<p><img src="https://gitee.com/yf33/blog/raw/master/uPic/image-20210130202226576.png" alt="image-20210130202226576"></p>
<p><img src="https://gitee.com/yf33/blog/raw/master/uPic/image-20210130202922541.png" alt="image-20210130202922541"></p>
<h4 id="网站发布">网站发布</h4>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">yang@pro blog % cat config.toml 
baseURL <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;https://yf33.gitee.io/blog/&#34;</span>
languageCode <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;en-us&#34;</span>
title <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;yf33&#34;</span>
theme <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;hyde&#34;</span>
hugo -D  <span style="color:#75715e">#代码编译</span>
git add . 
git commit -m <span style="color:#e6db74">&#39;update&#39;</span>
git push 
</code></pre></div><p><img src="https://gitee.com/yf33/blog/raw/master/uPic/image-20210130203619516.png" alt="image-20210130203619516"></p>
<h5 id="访问网站">访问网站</h5>
<p><a href="https://yf33.gitee.io/blog/">https://yf33.gitee.io/blog/</a></p>
<h4 id="参考地址">参考地址：</h4>
<p><a href="https://gitee.com/help/articles/4136">https://gitee.com/help/articles/4136</a></p>
<p><a href="https://www.gohugo.org/">https://www.gohugo.org/</a></p>
<p><a href="https://zhuanlan.zhihu.com/p/131550693">https://zhuanlan.zhihu.com/p/131550693</a></p>

</div>


    </main>

    
      
    
  </body>
</html>
